/*****************************************************************************/
/*!
 *  \file        imx179_tables.c \n
 *  \version     1.0 \n
 *  \author      Meinicke \n
 *  \brief       Image-sensor-specific tables and other
 *               constant values/structures for OV13850. \n
 *
 *  \revision    $Revision: 803 $ \n
 *               $Author: $ \n
 *               $Date: 2010-02-26 16:35:22 +0100 (Fr, 26 Feb 2010) $ \n
 *               $Id: OV13850_tables.c 803 2010-02-26 15:35:22Z  $ \n
 */
/*  This is an unpublished work, the copyright in which vests in Silicon Image
 *  GmbH. The information contained herein is the property of Silicon Image GmbH
 *  and is supplied without liability for errors or omissions. No part may be
 *  reproduced or used expect as authorized by contract or other written
 *  permission. Copyright(c) Silicon Image GmbH, 2009, all rights reserved.
 */
/*****************************************************************************/
#include <ebase/types.h>
#include <ebase/trace.h>
#include <ebase/builtins.h>

#include <common/return_codes.h>

#include "isi.h"
#include "isi_iss.h"
#include "isi_priv.h"
#include "IMX179_MIPI_priv.h"


/*****************************************************************************
 * DEFINES
 *****************************************************************************/


/*****************************************************************************
 * GLOBALS
 *****************************************************************************/

// Image sensor register settings default values taken from data sheet OV13850_DS_1.1_SiliconImage.pdf.
// The settings may be altered by the code in IsiSetupSensor.

//four lane
const IsiRegDescription_t Sensor_g_aRegDescription_fourlane[] =
{
	{0x0000,   0x00, "eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_fourlane_resolution_1632_1224[] =
{
	{0x0100,0x00,"0x0100",eReadWrite},
	{0x0101,0x00,"0x0100",eReadWrite},
	//{0x0202,0x09,"0x0100",eReadWrite},
	//{0x0203,0xCC,"0x0100",eReadWrite},
	{0x0301,0x05,"0x0100",eReadWrite},
	{0x0303,0x01,"0x0100",eReadWrite},
	{0x0305,0x06,"0x0100",eReadWrite},
	{0x0309,0x05,"0x0100",eReadWrite},
	{0x030B,0x01,"0x0100",eReadWrite},
	{0x030C,0x00,"0x0100",eReadWrite},
	{0x030D,0xA2,"0x0100",eReadWrite},
	{0x0340,0x09,"0x0100",eReadWrite},
	{0x0341,0xD0,"0x0100",eReadWrite},
	{0x0342,0x0D,"0x0100",eReadWrite},
	{0x0343,0x70,"0x0100",eReadWrite},
	{0x0344,0x00,"0x0100",eReadWrite},
	{0x0345,0x00,"0x0100",eReadWrite},
	{0x0346,0x00,"0x0100",eReadWrite},
	{0x0347,0x00,"0x0100",eReadWrite},
	{0x0348,0x0C,"0x0100",eReadWrite},
	{0x0349,0xCF,"0x0100",eReadWrite},
	{0x034A,0x09,"0x0100",eReadWrite},
	{0x034B,0x9F,"0x0100",eReadWrite},
	{0x034C,0x06,"0x0100",eReadWrite},
	{0x034D,0x60,"0x0100",eReadWrite},
	{0x034E,0x04,"0x0100",eReadWrite},
	{0x034F,0xC8,"0x0100",eReadWrite},
	{0x0383,0x01,"0x0100",eReadWrite},
	{0x0387,0x01,"0x0100",eReadWrite},
	{0x0390,0x01,"0x0100",eReadWrite},
	{0x0401,0x00,"0x0100",eReadWrite},
	{0x0405,0x10,"0x0100",eReadWrite},
	{0x3020,0x10,"0x0100",eReadWrite},
	{0x3041,0x15,"0x0100",eReadWrite},
	{0x3042,0x87,"0x0100",eReadWrite},
	{0x3089,0x4F,"0x0100",eReadWrite},
	{0x3309,0x9A,"0x0100",eReadWrite},
	{0x3344,0x57,"0x0100",eReadWrite},
	{0x3345,0x1F,"0x0100",eReadWrite},
	{0x3362,0x0A,"0x0100",eReadWrite},
	{0x3363,0x0A,"0x0100",eReadWrite},
	{0x3364,0x00,"0x0100",eReadWrite},
	{0x3368,0x18,"0x0100",eReadWrite},
	{0x3369,0x00,"0x0100",eReadWrite},
	{0x3370,0x77,"0x0100",eReadWrite},
	{0x3371,0x2F,"0x0100",eReadWrite},
	{0x3372,0x4F,"0x0100",eReadWrite},
	{0x3373,0x2F,"0x0100",eReadWrite},
	{0x3374,0x2F,"0x0100",eReadWrite},
	{0x3375,0x37,"0x0100",eReadWrite},
	{0x3376,0x9F,"0x0100",eReadWrite},
	{0x3377,0x37,"0x0100",eReadWrite},
	{0x33C8,0x00,"0x0100",eReadWrite},
	{0x33D4,0x06,"0x0100",eReadWrite},
	{0x33D5,0x68,"0x0100",eReadWrite},
	{0x33D6,0x04,"0x0100",eReadWrite},
	{0x33D7,0xD0,"0x0100",eReadWrite},
	{0x4100,0x0E,"0x0100",eReadWrite},
	{0x4108,0x01,"0x0100",eReadWrite},
	{0x4109,0x7C,"0x0100",eReadWrite},

	{0x0000,   0x00, "eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_1632x1224P30_fourlane_fpschg[] =
{

	{0x0202,0x09,"0x0100",eReadWrite},
	{0x0203,0xCC,"0x0100",eReadWrite},
	{0x0340,0x09,"0x0100",eReadWrite},
	{0x0341,0xD0,"0x0100",eReadWrite},
	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_1632x1224P25_fourlane_fpschg[] =
{
	{0x0202,0x0B,"0x0100",eReadWrite},
	{0x0203,0xC2,"0x0100",eReadWrite},
	{0x0340,0x0B,"0x0100",eReadWrite},
	{0x0341,0xC6,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_1632x1224P20_fourlane_fpschg[] =
{
	{0x0202,0x0E,"0x0100",eReadWrite},
	{0x0203,0xB3,"0x0100",eReadWrite},
	{0x0340,0x0E,"0x0100",eReadWrite},
	{0x0341,0xB7,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_1632x1224P15_fourlane_fpschg[] =
{
	{0x0202,0x13,"0x0100",eReadWrite},
	{0x0203,0x9B,"0x0100",eReadWrite},
	{0x0340,0x13,"0x0100",eReadWrite},
	{0x0341,0x9F,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_1632x1224P10_fourlane_fpschg[] =
{
	{0x0202,0x1D,"0x0100",eReadWrite},
	{0x0203,0x6B,"0x0100",eReadWrite},
	{0x0340,0x1D,"0x0100",eReadWrite},
	{0x0341,0x6F,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_fourlane_resolution_3264_2448[] =
{
	{0x0100,0x00,"0x0100",eReadWrite},
	{0x0101,0x00,"0x0100",eReadWrite},
	//{0x0202,0x09,"0x0100",eReadWrite},
	//{0x0203,0xCC,"0x0100",eReadWrite},
	{0x0301,0x05,"0x0100",eReadWrite},
	{0x0303,0x01,"0x0100",eReadWrite},
	{0x0305,0x06,"0x0100",eReadWrite},
	{0x0309,0x05,"0x0100",eReadWrite},
	{0x030B,0x01,"0x0100",eReadWrite},
	{0x030C,0x00,"0x0100",eReadWrite},
	{0x030D,0xA2,"0x0100",eReadWrite},
	{0x0340,0x09,"0x0100",eReadWrite},
	{0x0341,0xD0,"0x0100",eReadWrite},
	{0x0342,0x0D,"0x0100",eReadWrite},
	{0x0343,0x70,"0x0100",eReadWrite},
	{0x0344,0x00,"0x0100",eReadWrite},
	{0x0345,0x00,"0x0100",eReadWrite},
	{0x0346,0x00,"0x0100",eReadWrite},
	{0x0347,0x00,"0x0100",eReadWrite},
	{0x0348,0x0C,"0x0100",eReadWrite},
	{0x0349,0xBF,"0x0100",eReadWrite},
	{0x034A,0x09,"0x0100",eReadWrite},
	{0x034B,0x8F,"0x0100",eReadWrite},
	{0x034C,0x0C,"0x0100",eReadWrite},
	{0x034D,0xC0,"0x0100",eReadWrite},
	{0x034E,0x09,"0x0100",eReadWrite},
	{0x034F,0x90,"0x0100",eReadWrite},
	{0x0383,0x01,"0x0100",eReadWrite},
	{0x0387,0x01,"0x0100",eReadWrite},
	{0x0390,0x00,"0x0100",eReadWrite},
	{0x0401,0x00,"0x0100",eReadWrite},
	{0x0405,0x10,"0x0100",eReadWrite},
	{0x3020,0x10,"0x0100",eReadWrite},
	{0x3041,0x15,"0x0100",eReadWrite},
	{0x3042,0x87,"0x0100",eReadWrite},
	{0x3089,0x4F,"0x0100",eReadWrite},
	{0x3309,0x9A,"0x0100",eReadWrite},
	{0x3344,0x57,"0x0100",eReadWrite},
	{0x3345,0x1F,"0x0100",eReadWrite},
	{0x3362,0x0A,"0x0100",eReadWrite},
	{0x3363,0x0A,"0x0100",eReadWrite},
	{0x3364,0x00,"0x0100",eReadWrite},
	{0x3368,0x18,"0x0100",eReadWrite},
	{0x3369,0x00,"0x0100",eReadWrite},
	{0x3370,0x77,"0x0100",eReadWrite},
	{0x3371,0x2F,"0x0100",eReadWrite},
	{0x3372,0x4F,"0x0100",eReadWrite},
	{0x3373,0x2F,"0x0100",eReadWrite},
	{0x3374,0x2F,"0x0100",eReadWrite},
	{0x3375,0x37,"0x0100",eReadWrite},
	{0x3376,0x9F,"0x0100",eReadWrite},
	{0x3377,0x37,"0x0100",eReadWrite},
	{0x33C8,0x00,"0x0100",eReadWrite},
	{0x33D4,0x0C,"0x0100",eReadWrite},
	{0x33D5,0xD0,"0x0100",eReadWrite},
	{0x33D6,0x09,"0x0100",eReadWrite},
	{0x33D7,0xA0,"0x0100",eReadWrite},
	{0x4100,0x0E,"0x0100",eReadWrite},
	{0x4108,0x01,"0x0100",eReadWrite},
	{0x4109,0x7C,"0x0100",eReadWrite},
	{0x0000,   0x00, "eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_3264x2448P30_fourlane_fpschg[] =
{
	{0x0202,0x09,"0x0100",eReadWrite},
	{0x0203,0xCC,"0x0100",eReadWrite},
	{0x0340,0x09,"0x0100",eReadWrite},
	{0x0341,0xD0,"0x0100",eReadWrite},
	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_3264x2448P25_fourlane_fpschg[] =
{
	{0x0202,0x0B,"0x0100",eReadWrite},
	{0x0203,0xC2,"0x0100",eReadWrite},

	{0x0340,0x0B,"0x0100",eReadWrite},
	{0x0341,0xC6,"0x0100",eReadWrite},


	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_3264x2448P20_fourlane_fpschg[] =
{
	{0x0202,0x0E,"0x0100",eReadWrite},
	{0x0203,0xB3,"0x0100",eReadWrite},
	{0x0340,0x0E,"0x0100",eReadWrite},
	{0x0341,0xB7,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_3264x2448P15_fourlane_fpschg[] =
{
	{0x0202,0x13,"0x0100",eReadWrite},
	{0x0203,0x9B,"0x0100",eReadWrite},
	{0x0340,0x13,"0x0100",eReadWrite},
	{0x0341,0x9F,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_3264x2448P7_fourlane_fpschg[] =
{
	{0x0202,0x27,"0x0100",eReadWrite},
	{0x0203,0x3B,"0x0100",eReadWrite},

	{0x0340,0x27,"0x0100",eReadWrite},
	{0x0341,0x3F,"0x0100",eReadWrite},

	{0x0000 ,0x00,"eTableEnd",eTableEnd}
};


const IsiRegDescription_t Sensor_g_aRegDescription_twolane[] =
{
	{0x0000,   0x00, "eTableEnd",eTableEnd}
};

const IsiRegDescription_t Sensor_g_aRegDescription_onelane[] =
{
	{0x0000,   0x00, "eTableEnd",eTableEnd}
};



